package com.dom.domweb.modular.service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.dom.domweb.dao.entity.TGoodsInfo;
import com.dom.domweb.dao.service.ITGoodsInfoService;
import com.dom.domweb.modular.shiro.model.ShiroUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description 商品信息服务逻辑
 * @Author xllei
 * @Date 2018/12/15 3:32 PM
 * @Version 1.0
 **/
@Service
public class GoodsService extends AbstractApproveService {
    @Autowired
    private ITGoodsInfoService goodsInfoService;

    public List<TGoodsInfo> getGoodsList(ShiroUser user){
        Wrapper<TGoodsInfo> wrapper = new EntityWrapper<>();
        wrapper.eq("mem_code", user.getMemCode());
        wrapper.orderBy("id", true);
        return goodsInfoService.selectList(wrapper);
    }
}
